<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./css/main.css">
    <style>
        .box {
            width: 300px;
            height: 300px;
            border: solid;
        }

        #subbox {
            width: 100px;
            height: 100px;
            border: solid;
            background: gray;
        }
    </style>
</head>

<body>
    <div id="box" class="box">
        <div id="subbox"></div>
    </div>
    <script>
        const box = document.getElementById('box');

        console.log(box.clientHeight);
        console.log(box.clientWidth);
        console.log(box.offsetHeight);
        console.log(box.offsetWidth);
        //---
        console.log(box.clientLeft);
        console.log(box.clientTop);
        console.log(box.offsetLeft);
        console.log(box.offsetTop);
        //---
        console.log(box.scrollHeight);
        console.log(box.scrollTop);


    </script>
</body>

</html>